#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#include <unistd.h>
#include <fcntl.h>
#include "errsys.h"

unsigned long hash(char *s)
{
	unsigned long v = 0xf1e2d3c4;
	while (*s){
		v <<= 1;
		v += *s++;
	}

	return v;
}

unsigned long hash2(const char *s)
{
	char *p=s;
	unsigned long v = 0xf1e2d3c4;
	while(*p)
		v = v*7 + *p++;

	return v;
}

int main(int argc, char **argv)
{
	printf("%lu\n",hash(argv[1]));
	printf("%lu\n",hash2(argv[1]));
	return 0;
}

